﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<DVSProject.Models.ReportModels>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Change Machine</h2>
    <script type="text/javascript">
        $(document).ready(function () {
            $(".date").datepicker({ dateFormat: 'dd-mm-yy' });
            //getter
            var dateFormat = $(".date").datepicker("option", "dateFormat");
            //setter
            $(".date").datepicker("option", "dateFormat", 'dd-mm-yy');
            $('.date').datepicker();

        });

        if ($("#contract_start_date").val() != '') {
            var arrDate = $('#contract_start_date').val().split(" ");
            $('#contract_start_date').val(arrDate[0]);
        }
    </script>
    <% using (Html.BeginForm())
       {%>
    <%= Html.ValidationSummary(true) %>
    <fieldset>
        <legend>แก้ไข</legend>
      
        <div class="editor-label">
            เครื่อง :
        </div>
        <div class="editor-field">
            <%=Html.DropDownListFor(model => model.product, Model.ProductSelect)%>
        </div>
        <div class="editor-label">
            เดือน :
        </div>
        <div class="editor-field">
            <%=Html.DropDownListFor(model => model.set_month, Model.MonthShowSelect)%>
        </div>
        <div class="editor-label">
            วันที่จดมิเตอร์ :
        </div>
        <div class="editor-field">
            <%= Html.TextBoxFor(model => model.start_date, new { @class = "date" })%>
            <%= Html.ValidationMessageFor(model => model.start_date)%>
        </div>
        <div class="editor-label">
            ถึง:
        </div>
        <div class="editor-field">
            <%= Html.TextBoxFor(model => model.end_date, new { @class = "date" })%>
            <%= Html.ValidationMessageFor(model => model.end_date)%>
        </div>
    </fieldset>
    <p>
        <input class="buttonSummit" type="submit" value="Save" />
    </p>
    <% } %>
    <div>
        <%= Html.ActionLink("Back to List", "Index") %>
    </div>
</asp:Content>
